﻿<%@ Page Language="c#" ContentType="text/html" ResponseEncoding="utf-8" Async="true" MasterPageFile="~/administration/list_private.master" Inherits="ACM.cmsarea08.Administration.Core.getcompmenuItem" %>

<asp:Content ID="PageBody" Runat="server" ContentPlaceHolderID="MasterBody">
<ctl:MainButton id="adm_buttons" runat="Server" StandardForm="false"></ctl:MainButton>
<div class="dynform dfbody dfmainbody">
	<h1><img src="../template/admimg/user_model_big.jpg" alt="User Forms Manager" />Gestione Voci di Menu del conponente <%=CurrentComponentName%></h1><br/>
    <div id="addinstance" runat="server" class="istanceAdd">
    	<asp:Label AssociatedControlID="elencoINST" runat="server">Scegli un instanza:</asp:Label> <ctl:ChooseComponentInstance id="elencoINST" runat="server"></ctl:choosecomponentinstance>
        <br class="clearbr" />
        <asp:Label AssociatedControlID="groupName" runat="server"> Assegna un Nome al gruppo:</asp:Label><asp:TextBox id="groupName" runat="server"></asp:TextBox>
        <br class="clearbr" />        
        <asp:Button id="btm_add" runat="server" Text="Aggiungi Voci di Menu per Quest'ISTANZA"></asp:Button>
    </div>
    <div id="mesage" runat="server" class="Warning">
		Sono Presenti Voci di Menu non Assegnate, la prima "Aggiunta" aggiornerà quelle già presenti.
    </div>
	<DIV id="cgriglia" runat="server" class="MNGriglia">    
    Elenco delle Istanze Presenti: 
    <asp:GridView id="griglia" runat="server" AutoGenerateColumns="false" GridLines="Horizontal">
    	<headerstyle Font-Bold="true"></headerstyle>

    	<columns>
        	<asp:templatefield >
            	<headertemplate>Nome Gruppo</headertemplate>
        		<itemtemplate><%# (Eval("name_group").ToString()==""?"no-group name":Eval("name_group")) %></itemtemplate>
        		<edititemtemplate>
                	<asp:TextBox id="editgroup" runat="server" Text='<%# Eval("name_group") %>' />
                    <asp:Label id="labelgroup" runat="server" Text='<%# Eval("name_group") %>' Style="display:none;" />
                </edititemtemplate>
        	</asp:templatefield >
        	<asp:templatefield >
            	<headertemplate>Instanza Collegata</headertemplate>            
        		<itemtemplate><%#  (Eval("titolo").ToString()==""?"no-instance":Eval("titolo")) %></itemtemplate>
        		<edititemtemplate>
                	<ctl:ChooseComponentInstance id="itemINST" FilterComponent='<%# CurrentComponentName%>' SelectedComponent='<%# Eval("id_instance") %>' runat="server" ></ctl:choosecomponentinstance>
					<asp:Label id="labelinst" runat="server" Text='<%# Eval("id_instance") %>' Style="display:none;" />
                    </edititemtemplate>
        	</asp:templatefield >
        	<asp:templatefield >
            	<headertemplate>N. voci</headertemplate>
        		<itemtemplate><%#Eval("conto") %></itemtemplate>
        	</asp:templatefield >
            <asp:templatefield >
            	<itemtemplate>
                	<asp:LinkButton id="editm" runat="server" Text="Modifica" CommandName="Edit" CommandArgument='<%# Container.DataItemIndex %>'></asp:LinkButton>
                	<asp:LinkButton id="delm" runat="server" Text="Elimina" CommandName="Delete" CommandArgument='<%# Container.DataItemIndex %>' Visible='<%# (Container.DataItemIndex==0?false:true) %>'></asp:LinkButton>                    
                </itemtemplate>
                <edititemtemplate>
                	<asp:LinkButton id="annm" runat="server" Text="Annulla" CommandName="Reset" CommandArgument='<%# Container.DataItemIndex %>'></asp:LinkButton>
                	<asp:LinkButton id="savem" runat="server" Text="Salva" CommandName="Save" CommandArgument='<%# Container.DataItemIndex %>'></asp:LinkButton>                    
                </edititemtemplate>
            </asp:templatefield >
    	</columns>
    </asp:GridView>
	</DIV>
</div>
</asp:content>
